//
//  statusModel.swift
//  WBSwift
//
//  Created by maker on 2016/11/15.
//  Copyright © 2016年 maker. All rights reserved.
//

import UIKit

class statusModel: NSObject {
    var mid : Int = 0           //微博 id
    var text : String?          //正文
    var source :String?         //来源
    var created_at : String?    //创建时间
    var user : UserModel?       //微博的用户信息
    var pic_urls :[[String:String]] = [[String:String]]()  //配图的数组
    var retweeted_status : statusModel?                    //用户转发的字段
    
    
    init(dict:[String:AnyObject]) {
        super.init()
       
        setValuesForKeys(dict)
        
        if let userDict = dict["user"] as? [String:AnyObject] {
            user = UserModel(dict: userDict)
        }
        if let retweetedDict = dict["retweeted_status"] as? [String:AnyObject] {
            retweeted_status = statusModel(dict: retweetedDict)
        }
    }
    
    //防止没有写
    override func setValue(_ value: Any?, forUndefinedKey key: String) {
        
    }
    
}




